$(document).ready(function() {
	$('#employess').change(function(){
        var empId = $('#employess').val();
        $.ajax({
			type: "POST",
			url: "getCalendarList",
			data: "empId="+empId,
		success: function(response){
			$('#calendar').fullCalendar('removeEvents');
          	$('#calendar').fullCalendar('addEventSource', response);
		},
		error: function(e){
			alert("failure");
		}
		});
	});
	$('#calendar').fullCalendar({
        header: {
            left: 'prev,next today',
            center: 'title',
            right: 'month,agendaWeek,agendaDay'
        },
		editable: true,
		 events: "getLoggedEmployeeCalendar"
	});
});